
/*
	其他命令
	(group this) setVariable ["VCM_NOFLANK",true]; //这个命令将阻止AI小队执行先进的移动演习
	(group this) setVariable ["VCM_NORESCUE",true]; //这个命令将阻止AI小队响应支援呼叫
	(group this) setVariable ["VCM_TOUGHSQUAD",true]; //这个命令将阻止AI小组呼叫支援
	(group this) setVariable ["Vcm_Disable",true]; //此命令将完全禁用小队上的VCOM AI
	(group this) setVariable ["VCM_DisableForm",true]; //这个命令将禁止AI小队改变编队。
	(group this) setVariable ["VCM_Skilldisable",true]; //此命令将使一个AI小队不受vcom ai技能更改的影响

*/

Vcm_ActivateAI = true; //将此设置为false可禁用vcomai。可以随时将其设置为true以重新启用VCOM AI
VCM_SUPPRESSACTIVE = true; //设置为False以禁用AI压制系统
VcmAI_ActiveList = []; //别管这个
VCM_AIMagLimit = 2; //在AI寻找弹药之前剩余弹匣数量
VCM_Debug = false; //启用调试模式
VCM_MINECHANCE = 10; //埋地雷的概率
VCM_LGARRISONCHANCE = 20; //临时驻军概率 0 = disabled

//VCOM火炮。一次只能使用一种先进的火炮。
VCM_ARTYENABLE = false; //从VCOM启用改进的炮兵处理
VCM_ARTYSIDES = [west,east,resistance]; //使用VCOM/FFE火炮的阵营
VCM_ARTYLST = []; //炮兵内部所有AI清单，别管这个
VCM_ARTYDELAY = 300; //请求炮兵的小队之间的延迟
VCM_ARTYWT = -(VCM_ARTYDELAY);
VCM_ARTYET = -(VCM_ARTYDELAY);
VCM_ARTYRT = -(VCM_ARTYDELAY);
VCM_ARTYSPREAD = 400; //炮弹散布
Vcm_ArtilleryArray = []; //别管这个

//有效炮火处理。一次只能使用一种先进火炮. - https://forums.bohemia.net/forums/topic/159152-fire-for-effect-the-god-of-war-smart-simple-ai-artillery/
VCM_FFEARTILLERY = true;

VCM_SIDEENABLED = [west,east,resistance]; //激活VCOM AI的阵营
VCM_RAGDOLL = true; //Should AI ragdoll when hit 被击中时AI当布娃娃？？
VCM_RAGDOLLCHC = 50; //CHANCE AI RAGDOLL AI布娃娃概率？
VCM_AIHEALING = true; //让AI能自愈
VCM_FullSpeed = true; //在战斗中强制全速模式 (战斗结束后不重置)
VCM_HEARINGDISTANCE = 800; //AI听到远处未被抑制的枪声
VCM_WARNDIST = 1000; //AI可以向多远的小队请求帮助
VCM_WARNDELAY = 30; //AI需要生存多久才能请求支援。一旦人工智能进入战斗状态，就会激活。
VCM_STATICARMT = 300; //AI使用固定式武器的时间。这是为没有固定式武器背包的AI设计的。看到敌人会累加，没有敌人会逐渐减少，小于1时会离开固定式武器
VCM_StealVeh = true; //AI会偷车吗？
VCM_AIDISTANCEVEHPATH = 100; //距离小队长多远的AI检查偷车
VCM_ADVANCEDMOVEMENT = true; //如果没有为AI（2个或更多）生成其他路点，则AI将主动生成路点。false禁用此高级移动。
VCM_FRMCHANGE = true; //AI小组会根据自己的猜测改变阵型。
VCM_SKILLCHANGE = true; //AI小组的技能将由VCOM更改

//VCOM驾驶。实验特性
Vcm_DrivingActivated = false; //将此设置为false可禁用vcomai驾驶执行
VCM_DrivingDist = 10; // 从预测路径到搜索对象的距离。高数字可能导致不稳定
VCM_DrivingDelay = 0.75; //脚本应该多长时间寻找障碍
VCM_DRIVERLIMIT = 4; //每个周期计算多少驾驶员

//AI能技能设置!!!!!!!!!!!!
//低难度
//VCM_AIDIFA = [['aimingAccuracy',0.15],['aimingShake',0.1],['aimingSpeed',0.25],['commanding',1],['courage',1],['endurance',1],['general',1],['reloadSpeed',1],['spotDistance',0.85],['spotTime',0.85]];

//中等难度
VCM_AIDIFA = [['aimingAccuracy',0.25],['aimingShake',0.15],['aimingSpeed',0.35],['commanding',1],['courage',1],['endurance',1],['general',1],['reloadSpeed',1],['spotDistance',0.85],['spotTime',0.85]];

//高难度
//VCM_AIDIFA = [['aimingAccuracy',0.35],['aimingShake',0.4],['aimingSpeed',0.45],['commanding',1],['courage',1],['endurance',1],['general',1],['reloadSpeed',1],['spotDistance',0.85],['spotTime',0.85]];

//VCOMAI技能变量。默认值设置为中等难度（旧默认值）
//AIMING ACCURACY
VCM_AISKILL_AIMINGACCURACY_W = 0.25;
VCM_AISKILL_AIMINGACCURACY_E = 0.25;
VCM_AISKILL_AIMINGACCURACY_R = 0.25;

//瞄准抖动
VCM_AISKILL_AIMINGSHAKE_W = 0.15;
VCM_AISKILL_AIMINGSHAKE_E = 0.15;
VCM_AISKILL_AIMINGSHAKE_R = 0.15;

//瞄准速度
VCM_AISKILL_AIMINGSPEED_W = 0.35;
VCM_AISKILL_AIMINGSPEED_E = 0.35;
VCM_AISKILL_AIMINGSPEED_R = 0.35;

VCM_AISIDESPEC =
{
	//在应用组技能设置之前重新分配技能变量
	VCM_AIDIFWEST = [['aimingAccuracy',VCM_AISKILL_AIMINGACCURACY_W],['aimingShake',VCM_AISKILL_AIMINGSHAKE_W],['aimingSpeed',VCM_AISKILL_AIMINGSPEED_W],['commanding',1],['courage',1],['endurance',1],['general',1],['reloadSpeed',1],['spotDistance',0.85],['spotTime',0.85]];
	VCM_AIDIFEAST = [['aimingAccuracy',VCM_AISKILL_AIMINGACCURACY_E],['aimingShake',VCM_AISKILL_AIMINGSHAKE_E],['aimingSpeed',VCM_AISKILL_AIMINGSPEED_E],['commanding',1],['courage',1],['endurance',1],['general',1],['reloadSpeed',1],['spotDistance',0.85],['spotTime',0.85]];
	VCM_AIDIFRESISTANCE = [['aimingAccuracy',VCM_AISKILL_AIMINGACCURACY_R],['aimingShake',VCM_AISKILL_AIMINGSHAKE_R],['aimingSpeed',VCM_AISKILL_AIMINGSPEED_R],['commanding',1],['courage',1],['endurance',1],['general',1],['reloadSpeed',1],['spotDistance',0.85],['spotTime',0.85]];
	
	private _Side = (side (group _this));
	switch (_Side) do {
		case west:
		{
			{
				_this setSkill _x;
			} forEach VCM_AIDIFWEST;
		};
		case east:
		{
			{
				_this setSkill _x;
			} forEach VCM_AIDIFEAST;
		};
		case resistance:
		{
			{
				_this setSkill _x;
			} forEach VCM_AIDIFRESISTANCE;
		};
	};
};


VCM_CLASSNAMESPECIFIC = false; //你想让AI有特定于类名的技能设置吗？
VCM_SIDESPECIFICSKILL = true; //你想让AI有特定的技能设置吗？这将重写类名特定的技能。
VCM_SKILL_CLASSNAMES = []; //在这里你可以将某些单位类名分配给特定的技能级别。这将覆盖上面的人工智能技能等级。

/*
VCM_skill_类名示例

VCM_SKILL_CLASSNAMES = [["Classname1",[aimingaccuracy,aimingshake,spotdistance,spottime,courage,commanding,aimingspeed,general,endurance,reloadspeed]],["Classname2",[aimingaccuracy,aimingshake,spotdistance,spottime,courage,commanding,aimingspeed,general,endurance,reloadspeed]]];

VCM_SKILL_CLASSNAMES = 	[
	["B_GEN_Soldier_F",[0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1]],
	["B_G_Soldier_AR_F",[0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1]]
];
*/

//设置AI技能等级
VCM_AIDIFSET =
{
	//如果禁用VCOM SkillChange，则跳过
	if (!VCM_SKILLCHANGE) exitWith {};
	{
		private _unit = _x;
		_unit setSkill 0.9;
		_unit allowFleeing 0;
		{
			_unit setSkill _x;
		} forEach VCM_AIDIFA;


		if (VCM_CLASSNAMESPECIFIC && {count VCM_SKILL_CLASSNAMES > 0}) then
		{
			{
				if (typeOf _unit isEqualTo (_x select 0)) exitWith
				{
					_ClassnameSet = true;
					_unit setSkill ["aimingAccuracy",((_x select 1) select 0)];_unit setSkill ["aimingShake",((_x select 1) select 1)];_unit setSkill ["spotDistance",((_x select 1) select 2)];_unit setSkill ["spotTime",((_x select 1) select 3)];/*_unit setSkill ["courage",((_x select 1) select 4)];_unit setSkill ["commanding",((_x select 1) select 5)];*/ _unit setSkill ["aimingSpeed",((_x select 1) select 6)];_unit setSkill ["general",((_x select 1) select 7)];_unit setSkill ["endurance",((_x select 1) select 8)];_unit setSkill ["reloadSpeed",((_x select 1) select 9)];
				};
			} foreach VCM_SKILL_CLASSNAMES;
		};

		if (VCM_SIDESPECIFICSKILL) then
		{
			_unit call VCM_AISIDESPEC;
		};

	} forEach (units _this);
};

diag_log "VCOM: Loaded Default Settings";
